<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<c:set var="contextPath" value="${pageContext.request.contextPath}"/>

	<form role="form" id="myform">
		<div class="form-title">
           	项目信息
        </div>
        <div class="row">
        	<input type="hidden" name="id" id="id" value="${user.id }"/>
        	<div class="col-sm-6">
               <div class="form-group">
                   <label for="idNumber" style="display:block;">用户类型</label>
                   	<select id="userType" name="userType" style="width:170px;" tabindex="-1" >
                   	<c:if test="${user.userType eq '' || user.userType eq undefined}">
                        <option value="1">男</option>
                        <option value="2">女</option>
                    </c:if>
                   	<c:if test="${user.userType eq '1' }">
                        <option value="1" selected="selected">男</option>
                        <option value="2">女</option>
                    </c:if>
                   	<c:if test="${user.userType eq '2'}">
                        <option value="1">男</option>
                        <option value="2" selected="selected">女</option>
                    </c:if>
               		</select>
               </div>
            </div>   
        	<div class="col-sm-6">
               <div class="form-group">
                   <label for="idNumber">用户昵称</label>
                   <input type="text" class="form-control" style="width:170px" id="username" name="username" autocomplete="off" <c:if test="${htmlPageType == 'edit'}">
                   		value="${user.username}" </c:if> placeholder="用户昵称">
               </div>
            </div>   
        	<div class="col-sm-6">
               <div class="form-group">
                   <label for="idNumber">用户密码</label>
                   <input type="password" class="form-control" style="width:170px" id="password" name="password" autocomplete="off" <c:if test="${htmlPageType == 'edit'}">
                   		value="${user.password}"  disabled="disabled"</c:if> placeholder="用户密码">
               </div>
            </div>   
        	<div class="col-sm-6">
               <div class="form-group">
                   <label for="idNumber">真实姓名</label>
                   <input type="text" class="form-control" style="width:170px" id="realname" name="realname" autocomplete="off" <c:if test="${htmlPageType == 'edit'}">
                   		value="${user.realname}" </c:if> placeholder="真实姓名">
               </div>
            </div>   
        	
        	<div class="col-sm-6">
               <div class="form-group">
                   <label for="idNumber">创建时间</label>
                   <p class="form-control" style="width:170px" id="createtime" ><fmt:formatDate value='${user.createTime}' type='date' pattern='yyyy-MM-dd'/></p>
               </div>
            </div>  
            
        	<div class="col-sm-6">
               <div class="form-group">
                   <label for="idNumber">更新时间</label>
                   <p class="form-control" style="width:170px" id="updatetime" ><fmt:formatDate value='${user.updateTime}' type='date' pattern='yyyy-MM-dd'/></p>
               </div>
            </div>  
            
        </div>
        
		<div class="form-group text-center">
			<c:if test="${htmlPageType == 'new'}">
		        <button type="button" class="btn btn-primary" onclick="server.submitForm('myform','/user/add',common.validate,null,common.paginationQuery,1)">保存</button>
			</c:if>
			<c:if test="${htmlPageType == 'edit'}">
		        <button type="button" class="btn btn-primary" onclick="server.submitForm('myform','/user/edit',common.validate,null,common.paginationQuery,1)">保存</button>
			</c:if>
	        <button type="button" class="btn btn-danger" onclick="server.closeModalBox()">关闭</button>
	     </div>
	</form>
	<script src="${contextPath }/assets/ajaxupload/js/ajaxupload.3.6.js"></script>
	<script src="${contextPath }/assets/common/js/fileoperator.js"></script>
	<script type="text/javascript">
	$(document).ready(function() {
		server.loadSecondDatePick("#signingstart");
		server.loadSecondDatePick("#signingend"); 
		/* laydate.render({
		    elem: '#signingstart' //指定元素
		  });
		laydate.render({
		    elem: '#signingend' //指定元素
		  }); */
		  
		//初始上传按钮
		//fileoperator.initUploadfile('btnFileUpload','fileName','dataManagementFileShowDiv','${htmlPageType}',null);
	});
</script>